package com.designpatterns.command.command.stereo;

import com.designpatterns.command.command.Command;
import com.designpatterns.command.entity.Stereo;

/**
 * @author Brook
 */
public class StereoOffWithCDCommand implements Command {
    Stereo stereo;

    public StereoOffWithCDCommand(Stereo stereo) {
        this.stereo = stereo;
    }

    @Override
    public void excute() {
        stereo.off();
    }

    @Override
    public void undo() {
        stereo.on();
    }
}
